package com.fuluwa.domain.security.model;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fuluwa.domain.shared.AbstractIdDomainObject;
import com.google.common.collect.Lists;

/**
 * 开发团队.
 * 
 * @author calvin
 */
@Entity
@Table(name = "ss_team")
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Team extends AbstractIdDomainObject {

	private String name;
	@NotNull
	@OneToOne
	@JoinColumn(name = "master_id")
	private User master;
//	@OneToMany(mappedBy = "team")
//	private List<User> userList = Lists.newArrayList();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	public User getMaster() {
		return master;
	}

	public void setMaster(User master) {
		this.master = master;
	}

	
//	public List<User> getUserList() {
//		return userList;
//	}
//
//	public void setUserList(List<User> userList) {
//		this.userList = userList;
//	}
}
